import requests
import json
import csv

url = 'https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=chinaDayList,chinaDayAddList,nowConfirmStatis,provinceCompare'


def read2():
    r = requests.get(url)
    j = json.loads(r.text)
    # print(type(j))
    list1 = j['data']['chinaDayList']
    list2 = [[ '治愈人数', '死亡人数', '确诊人数']]
    for i in range(6):

        list2.append([str(list1[i]['heal']), str(list1[i]['dead']),str(list1[i]['confirm'])])
        print(" ")
    return list2

if __name__ == '__main__':
    list2 = read2()
    for i in list2:
        print(i[0])
        break
